<template>
	<view class="container">
		<view class="list-content"  v-for="(item,index) in list" :key="index">
			<view class="bg padding_20">
				<view class="flex-between">
					<view>生成时间：2020-12-19</view>
					<view>订单总额：￥200</view>
				</view>
				<view class="flex-between margin_top_10 border-bottom">
					<view>订单编号：000000000</view>
					<view>会员折扣：9折</view>
				</view>
				<view class="flex-between margin_top_10 item-padding border-bottom">
					<view class="flex">
						<image src="../static/imgs/8.jpg" mode="" style="width: 120rpx;height: 120rpx;border-radius: 10rpx;"></image>
						<view class="margin_left_20">
							<view>商品名称</view>
							<view class="color-text margin_top_30 color-text">x1 <span style="color: red;margin-left: 30rpx;">￥11.00</span></view>
						</view>
					</view>
				</view>
				<view class="flex-between margin_top_20">
					<view>
						<view class="shouyi-text">实际收益</view>
						<view class="price" style="color: red;">￥80</view>
					</view>
					<view>
						<view class="shouyi-text">本单总额</view>
						<view class="price">￥100</view>
					</view>
					<view>
						<view class="shouyi-text">会员折扣</view>
						<view class="price">￥10</view>
					</view>
					<view>
						<view class="shouyi-text">平台抽成</view>
						<view class="price">￥10</view>
					</view>
				</view>
			</view>
		</view>
		<!-- <u-empty text="暂无数据" mode="list" v-if="list==''" margin-top="200"></u-empty> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[1,2,3],
				yudingpopup: false, //弹窗显示
				kuang:false,
				desc:'',
				showlist:false,
				id:0,
				page:0,
			}
		},

		onPullDownRefresh(){//下拉刷新
			uni.startPullDownRefresh();
			this.page=0
			this.list = []
			this.init(this.page)
			
			setTimeout(function () {
				uni.stopPullDownRefresh ();
			}, 1000); 
		},
		onReachBottom() {
			console.log(this.page);
			this.page = this.page+1
			this.init(this.page)

		},
		onLoad(o) {
			var that = this;
			this.init(this.page);
		},
		
		methods: {
			init(page) {
				this.global.request.post({
					data:{
						do:"order",
						op:"shouyi_list",
						type:'shifu',
						page:page
					},
					success:res=>{
						this.list = this.list.concat(res);
						if(this.userlist == ""){
							this.showlist = true
						}
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.list-content{
		margin-top: 20rpx;
		margin:30rpx;
		box-shadow: 1px 0px 6px rgba(0, 0, 0, .2);
		border-radius: 20rpx;
	}
	.border-bottom{
		padding-bottom: 20rpx;
		border-bottom: 1px solid #F1F1F1;
	}
	.color-text{
		color:$uni-text-color-grey ;
	}
	.content-title{
		font-weight: bold;
		padding: 20rpx 0;
	}
	.shouyi-text{
		font-size: 26rpx;
	}
	.price{
		margin-top: 16rpx;
		color:$uni-text-color-grey ;
	}
	.flex-between{
		display: flex;
		justify-content: space-between;
	}
</style>
